package com.ft.web.model;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.Setter;
import org.springframework.http.HttpStatus;

import java.io.Serializable;

/**
 * @copyright (C), 2015-2019, 梵途科技有限公司
 * @fileName: AbstractResponse
 * @author: 李阳
 * @date: 2019/4/17 17:13
 * @description: 抽象的响应类
 */
abstract class AbstractResponse implements Serializable {

    private static final long serialVersionUID = 9109499183394990085L;

    /**
     * 响应业务代码
     */
    @Getter
    @Setter
    @JSONField(ordinal = 1)
    private int code = HttpStatus.OK.value();

    /**
     * 是否成功
     */
    @Getter
    @Setter
    @JSONField(ordinal = 2)
    private Boolean success;

    /**
     * 响应消息
     */
    @Getter
    @Setter
    @JSONField(ordinal = 3)
    private String msg;

    /**
     * 请求路径
     */
    @Getter
    @Setter
    @JSONField(ordinal = 4)
    private String path;
}
